package com.zr.inquiry.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import java.util.Date;
import java.util.List;


@Data
public class InquiryVo {
    private Integer id;
    private String requestForQuotationId;
    private Integer currencyCode;
    private String currencyCodeName;
    private Integer inquiryStatus;
    private Integer legalPersonId;
    private Integer type;
    private String typeName;
    private Integer isTax;
    private String isTaxName;
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
    private Date startTime;
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
    private Date endTime;
    private String creatorName;
    private Date createTime;
    private String updateName;
    private Date updateTime;

    @NotEmpty(message = "备件信息不能为空！")
    @Valid
    private List<InquirySpareCodeVo> inquiryDetailsList;

    @NotEmpty(message = "供应商信息不能为空！")
    @Valid
    private List<InquirySupplierVo> supplierDetailsList;
}
